<?php
/*
 * Created on 2011-4-23
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
require ('../Common.inc.php');
require(SERVER_ROOT_PATH.'/config/base.config.php');
require (SERVER_ROOT_PATH . '/lib/Framework.class.php');

new Framework();

$identity=$_GET['identity'];
$url=urldecode($_GET['u']);
$host=parse_url($url,PHP_URL_HOST);
$title=urldecode($_GET['t']);

$u=new User('r');
$user=$u->getUserByIdentity($identity);

if(count($user)==0){
	header("Location:login.php");
}
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>读读</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
                        <meta name="viewport" content="width=770"/>
        <link rel="icon" href="/favicon.png"/>
                
        <script type="text/javascript" src="../js/combined.js?12"></script>
                <script type="text/javascript" src="../js/sharing.js?12"></script>
                <link rel="stylesheet" href="../css/main.css?12"/>
    </head>
    <body>
        <div id="header">
            <div id="userpanel">
                
                                    Hello, <b><?php echo $user[0]['username']?></b>.
 
                    <a href="/extras">Extras</a>
                    <span style="color: #ccc;">&bull;</span>
                    <a href="/user">Account</a>
                    <span style="color: #ccc;">&bull;</span>
                    <a href="/user/logout.php">退出</a>
                
            </div>
 
            <h1 id="logo">
                <a href="/u" class="logo">读读</a>
            </h1>
 
            <div style="font-size: 14px; margin-top: 8px;">A simple tool to save web pages for reading later.</div>
        </div>
 
        <div id="content">
            <div style="margin: 50px auto; width: 60%; font-family: Georgia, Times, 'Times New Roman', serif; text-align: center;">
 
    <h2>Read Later</h2>
    
    <p>
        Add 
                    <a href="<?php echo $url;?>"><?php echo $title;?></a>
                from <b><?php echo strtoupper($host)?></b>
        to your 读读帐号?
    </p>
 
    <form action="/article/fetch.php" method="post" style="margin-bottom: 4em;">
        <input type="hidden" name="identity" value="<?php echo $identity;?>"/>
        <input type="hidden" name="u" value="<?php echo $url;?>"/>
        <input type="hidden" name="t" value="<?php echo $title;?>"/>
        <input type="hidden" name="s" value=""/>
        <input type="hidden" name="a" value=""/>
        <input type="submit" value="添加本文到你的读读帐号"/>
    </form>
 
    
</div>
        </div>
 
        <div id="footer">
 
            <a href="/faq">FAQ</a> &bull;
            <a href="/main/support">Support</a> &bull;
            <a href="/iphone">iPhone App</a> &bull;
            <a href="http://blog.instapaper.com/">Blog</a> &bull;
            <a href="http://twitter.com/instapaper">Twitter</a> &bull;
            <a href="/publishers">Information for Publishers</a> &bull;
            <a href="/press-kit">Press Kit</a> &bull;
            <a href="/privacy-policy">Privacy Policy</a> &bull;
            <a href="/api/full">API</a>
 
            
            <div style="margin-top: 1em;">
            &copy;&nbsp;2008-2011 Instapaper, LLC.
            Contact <a href="http://www.marco.org/">Marco Arment</a>, founder:
            <a href="mailto:instapaper@marco.org">instapaper@marco.org</a>.
            </div>
        </div>
        <script type="text/javascript">
 
          var _gaq = _gaq || [];
          _gaq.push(['_setAccount', 'UA-638312-6']);
          _gaq.push(['_trackPageview']);
 
          (function() {
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
          })();
 
        </script>
    </body>
</html>




